<template>
  <div>
    <h2>从业人员基础信息</h2>

    <h5>
      查询指定数据：<input type="text" v-model="searchCondition" placeholder="请输入查询Xxx">
      <el-button type="primary" @click="selectcondition">点击查询</el-button>
    </h5>

    <el-table :data="practitionerList" style="width: 100%" border empty-text="暂无数据" >

      <el-table-column prop="APPNO" label="申请号" width="180" />

      <el-table-column prop="APPROVE" label="审批" width="180" />

      <el-table-column prop="ARCHIVESSTATUS" label="档案状态" width="180" />

      <el-table-column label="操作">
        <template #default="scope">
          <el-button type="success" @click="test(scope.row)">查看详细</el-button>
        </template>
      </el-table-column>
    </el-table>

    <el-dialog v-model="dialogVisible" title="详细信息" width="30%">
      <div style="text-align: left">
        申请号:{{Practitioner.APPNO}}
        <br/>
        审批:{{Practitioner.APPROVE}}
        <br/>
        档案状态:{{Practitioner.ARCHIVESSTATUS}}
        <br/>
        审计单位:{{Practitioner.AUDITUNIT}}
        <br/>
        所属单位:{{Practitioner.BELONGUNIT}}
        <br/>
        业务区域:{{Practitioner.BUSINESSAREA}}
        <br/>
        业务类型:{{Practitioner.BUSINESSTYPE}}
        <br/>
        卡发行单位:{{Practitioner.CARDISSUEUNIT}}
        <br/>
        创建人:{{Practitioner.CREATER}}
        <br/>
        创建时间:{{Practitioner.CREATETIME}}
        <br/>
        创建单位:{{Practitioner.CREATEUNIT}}
        <br/>
        客户ID:{{Practitioner.CID}}
        <br/>
        数据编号:{{Practitioner.DATANO}}
        <br/>
        驾驶证号:{{Practitioner.DRIVECARDNUM}}
        <br/>
        员工地址:{{Practitioner.EMPADDRESS}}
        <br/>
        员工生日:{{Practitioner.EMPBIRTH}}
        <br/>
        员工联系电话:{{Practitioner.EMPCONTTEL}}
        <br/>
        员工教育经历:{{Practitioner.EMPEDUEXP}}
        <br/>
        员工邮箱:{{Practitioner.EMPEMAIL}}
        <br/>
        员工健康:{{Practitioner.EMPHEALTH}}
        <br/>
        员工身份证号:{{Practitioner.EMPIDNUM}}
        <br/>
        员工证件类型:{{Practitioner.EMPIDTYPE}}
        <br/>
        员工卡日期:{{Practitioner.EMPLOYEECARDDATE}}
        <br/>
        员工ID:{{Practitioner.EMPLOYEEID}}
        <br/>
        员工编号:{{Practitioner.EMPLOYEENO}}
        <br/>
        员工手机:{{Practitioner.EMPMOBILE}}
        <br/>
        员工姓名:{{Practitioner.EMPNAME}}
        <br/>
        员工民族:{{Practitioner.EMPNATION}}
        <br/>
        员工籍贯:{{Practitioner.EMPNATIVE}}
        <br/>
        员工邮编:{{Practitioner.EMPPOSTCODE}}
        <br/>
        员工职责:{{Practitioner.EMPPRODUTY}}
        <br/>
        员工性别:{{Practitioner.EMPSEX}}
        <br/>
        文件编号:{{Practitioner.FILENO}}
        <br/>
        首次领卡日期:{{Practitioner.FSTGETCARDDATE}}
        <br/>
        诚信分数:{{Practitioner.INTEGRITYSCORES}}
        <br/>
        是否锁定:{{Practitioner.ISLOCK}}
        <br/>
        操作时间:{{Practitioner.OPERATETIMME}}
        <br/>
        操作单位:{{Practitioner.OPERATEUNIT}}
        <br/>
        操作人:{{Practitioner.OPERATOR}}
        <br/>
        所有者ID:{{Practitioner.OWNERID}}
        <br/>
        备注:{{Practitioner.REMARK}}
        <br/>
        有效期开始:{{Practitioner.VALDATEBEGIN}}
        <br/>
        有效期结束:{{Practitioner.VALDATEEND}}
        <br/>
        有效期间:{{Practitioner.VALIDTEPERIOD}}
        <br/>

        <el-button  @click="addOne(Occupationalrequirements)">
          点击添加
        </el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import axios from "axios";
import {ElMessage} from "element-plus";
export default {
  name: "PractitionerView",
  data(){
    return {
      practitionerList:[],
      dialogVisible:false,
      Practitioner:{},
      searchCondition:"",
    }
  },created() {
    axios("http://localhost:8000/consumerselect/practitioner").then(
        (res)=>{
          this.practitionerList = res.data;
          ElMessage.info("数据查询完成")
        }
    )
  },methods:{
    test(row){
      this.Practitioner = row;
      this.dialogVisible = true;
    },
    selectcondition(){
      axios(`http://localhost:8000/consumerselect/practitioner?app_no=${this.searchCondition}`).then(
          (res)=>{
            console.log(res.data)
            this.practitionerList = res.data
            ElMessage.info("条件查询完成")
          }
      )
    },
    addOne(row){
      alert("添加功能还未开放")
    }
  }
}
</script>

<style scoped>

</style>